package com.example.farmeri.pojo;


import com.example.farmeri.data.config.ServiceConfig;
import com.example.farmeri.http.HttpCookieManager;
import com.example.farmeri.tools.UploadUtil;

public class User {

    /**
     * 用户id
     */
    String id;

    /**
     * 登录名称
     */
    String login_name;
    /**
     * 昵称
     */
    String nick_name;
    /**
     * 头像地址
     */
    String icon;

    /**
     * 登录密码
     */
    String password;

    /**
     * shiro加密盐
     */
    String salt;

    /**
     * 请求身份
     */
    String identity;

    /**
     * 请求地点
     */
    String request_place;

    /**
     * 手机号码
     */
    String tel;

    /**
     * 邮箱地址
     */
    String email;

    String age;
    /**
     * 账户是否锁定
     */
    Boolean locked;


    /**
     * 账户是否后台用户
     */
    Integer isAdmin;

    /**
     * 用户信誉积分
     */
    float credit;

    String remarks;

    public String getIntroduce() {
        return remarks;
    }

    public void setIntroduce(String introduce) {
        this.remarks = introduce;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLogin_name() {
        return login_name;
    }

    public void setLogin_name(String login_name) {
        this.login_name = login_name;
    }

    public String getNick_name() {
        return nick_name;
    }

    public void setNick_name(String nick_name) {
        this.nick_name = nick_name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getRequest_place() {
        return request_place;
    }

    public void setRequest_place(String request_place) {
        this.request_place = request_place;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }

    public Integer getIsAdmin() {
        return isAdmin==null? 0
                :1;
    }

    public void setIsAdmin(Integer isAdmin) {
        this.isAdmin = isAdmin;
    }

    public float getCredit() {
        return credit;
    }

    public void setCredit(float credit) {
        this.credit = credit;
    }

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", loginName='" + login_name + '\'' +
                ", nickName='" + nick_name + '\'' +
                ", icon='" + icon + '\'' +
                ", password='" + password + '\'' +
                ", salt='" + salt + '\'' +
                ", identity='" + identity + '\'' +
                ", requestPlace='" + request_place + '\'' +
                ", tel='" + tel + '\'' +
                ", email='" + email + '\'' +
                ", age='" + age + '\'' +
                ", locked=" + locked +
                ", isAdmin=" + isAdmin +
                ", credit=" + credit +
                ", remark=" + remarks +
                '}';
    }
}
